﻿using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dapper;

namespace SIG.DAL.Dapper.Services
{
    public class BackupService
    {
        private DbConnection _connection;
        public int Backup(string query)
        {
            int result;
            using (_connection = Utilities.GetOpenConnection())
            {
                result = _connection.Execute(query);
            }
            return result;
        }
        

        public int Restore(string query)
        {
            int result;
            using (_connection = Utilities.GetOpenConnection())
            {
                result = _connection.Execute(query);
            }
            return result;
        }
    }
}
